<%--
  Created by IntelliJ IDEA.
  User: TYK
  Date: 2020/7/2
  Time: 22:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>单文件上传</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
</script>
</head>
<body>
<div>
    <a onclick="details();">家庭成员情况</a>
</div>

<div>
    <table>
        <tr>
            <td>
                <label>男方照片：</label>
            </td>
            <td>
                <img id="boy"  alt="加载失败" height="50px" weight="50px" >
            </td>
        </tr>
        <tr>
            <td>
                <label>女方照片：</label>
            </td>
            <td>
                <img id="girl"  alt="加载失败" height="50px" weight="50px" >
            </td>
        </tr>
    </table>
</div>
</body>
<script type="text/javascript">
    function details() {
        var jtbm = document.getElementById("e_jt").value;
        $.ajax({
            type : 'POST',
            url : "",//请求controller的路径
            data : {jt : jtbm},
            success : function xs(d){

            //请求成功，给照片处可以用下面的方法给src属性赋值
            $("#boy").attr('src',d.map['boy']);
            $("#girl").attr('src',d.map['girl']);
        }
    })
    }
</script>
</html>
